Favorites

interface Favorites

This module is used to manage favorites.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val favorites: ArrayItemList<IRainbowFavorite>

Get all favorites. The returned @object:ArrayItemList object allows you to listen changes. so you can listen to its changes

Functions

Link copied to clipboard
abstract fun createFavorite(peerId: String?, type: PeerType?, listener: RainbowListener<IRainbowFavorite, CreateFavoriteError>? = null)

Creates a favorite at the end of the list.

Link copied to clipboard
abstract fun createFavoriteFromContact(contact: IRainbowContact?, listener: RainbowListener<IRainbowFavorite, CreateFavoriteError>? = null)

Creates a favorite at the end of the list

Link copied to clipboard
abstract fun createFavoriteWithPosition(peerId: String?, type: PeerType?, position: Int, listener: RainbowListener<IRainbowFavorite, CreateFavoriteError>? = null)

Creates a favorite and insert it at the requested position. All others favorites will be automatically shifted.

Link copied to clipboard
abstract fun deleteFavorite(favorite: IRainbowFavorite, listener: RainbowListener<Unit, Unit>? = null)

Deletes a favorite.

Link copied to clipboard
abstract fun getFavorite(favoriteId: String?): IRainbowFavorite?

Get a favorite from its id.

Link copied to clipboard
abstract fun getFavoriteByPeerId(peerId: String?): IRainbowFavorite?

Get a favorite by the peerId.

Link copied to clipboard
abstract fun updateFavoritePosition(favoriteId: String, position: Int, listener: RainbowListener<IRainbowFavorite, Unit>? = null)

Updates the favorite's position